import React from 'react'
import { Outlet, useNavigate,useLocation  } from "react-router-dom";
export default function Home() {
  let navigate = useNavigate()
  let location = useLocation();
  return (
    <>
      <div>Home</div>
      <button onClick={() => navigate('/about',{state:{hhh:'from home page',yyy:'nnn'}})}>去about</button>
      <p>{location.state}</p>
      <Outlet />
    </>
  )
}
